package mrusanov.tournament

import mrusanov.team.{Team, Club}
import mrusanov.money.PrizeMoneyChangeReason

class RoundRobinTournamentReward(rewardForPlace:(Int => Int)) extends TournamentReward {
   override def payReward(clubs:List[Team]) {
     clubs.zipWithIndex.foreach(pair => {
       val reward = rewardForPlace(pair._2 + 1)
       pair._1.club.clubBudget.acceptMoneyChangeReason(PrizeMoneyChangeReason(reward))     })
   }
}
